<template>
  <div class="hm-son">
    我是子组件---{{ sonnum }}
    <br>
    <button @click="$emit('update:sonnum',sonnum+1)">点击修改sonnum</button>
  </div>
</template>
<script>
export default {
  props: {
    sonnum: {
      type: Number,
      required: true
    }
  }
}
</script>
<style lang='scss' scoped>
.hm-son{
    width: 300px;
    height: 300px;
    border:5px solid red;;
}
</style>
